package com.itheima.day20.demo07;

import java.util.List;
import java.util.Set;
import java.util.stream.Collectors;
import java.util.stream.Stream;

public class StreamCollectors {
    public static void main(String[] args) {
        Stream<Integer> stream = Stream.of(10, 20, 30, 40, 50);
        List<Integer> list = stream.collect(Collectors.toList());
        Set<Integer> set = stream.collect(Collectors.toSet());
        Integer[] array = stream.toArray(Integer[]::new);
    }

}
